package frontend;

public class Token {
    private final String word;
    private final String type;
    private final int line;
    public Token(String word,String type,int line) {
        this.word = word;
        this.type = type;
        this.line = line;
    }
    public int getLine() {
        return line;
    }
    public String getWord() {
        return word;
    }
    public boolean notSameLine(Token token) {
        return this.line != token.getLine();
    }
    @Override
    public String toString() {
        return this.type + " " +word;
    }

    public boolean isEqualStr(String word) {
        return this.word.equals(word);
    }
    public boolean isEqualType(String type) {
        return this.type.equals(type);
    }
}
